package com.csun.cmny.provider.model.dto.phone;

import com.csun.cmny.provider.validator.DmcDeviceEditValidator;
import com.csun.cmny.provider.validator.DmcPhoneZoneAddValidator;
import com.csun.cmny.provider.validator.DmcPhoneZoneEditValidator;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @Auther: chisj chisj@foxmal.com
 * @Date: 2019-01-08 14:34
 * @Description: the class dmc phone zone add dto.
 */
@Data
@ApiModel(value = "智能电话机防区新增Dto")
public class DmcEditPhoneZoneDto implements Serializable {

    private static final long serialVersionUID = -3471235327383653232L;

    /**
     * 防区Id
     */
    @NotNull(message = "{phone.zone.id.null}",
            groups = {DmcPhoneZoneEditValidator.class})
    private Long id;

    /**
     * 设备Id
     */
    @NotNull(message = "{device.id.null}",
            groups = {DmcPhoneZoneAddValidator.class})
    private Long deviceId;

    /**
     * 电话机防区编号
     */
    @NotNull(message = "{phone.zone.no.null}",
            groups = {DmcPhoneZoneAddValidator.class})
    @NotEmpty(message = "{phone.zone.no.null}",
            groups = {DmcPhoneZoneAddValidator.class})
    private String zoneNo;

    /**
     * 电话机防区类型
     */
    @NotNull(message = "{phone.zone.type.null}",
            groups = {DmcPhoneZoneAddValidator.class})
    @Range(min = 1, max = 9, message = "{phone.zone.type.rang}")
    private Integer zoneType;

    /**
     * 防区是否有声 0-无声 1-有声
     */
    private Integer zoneSound;

    /**
     * 防区是否延时 0-不延时 1-延时
     */
    private Integer zoneDelay;

    /**
     * 防区是否周界 0-不周界 1-周界
     */
    private Integer zoneWorld;

    /**
     * 防区是否门铃 0-不门铃 1-门铃
     */
    private Integer zoneBell;

    /**
     * 防区是否紧急 0-不紧急 1-紧急
     */
    private Integer zoneUrgent;

}
